﻿/*
 * Erstellt mit SharpDevelop.
 * Benutzer: Kai Patrick
 * Datum: 17.03.2008
 * Zeit: 13:54
 * 
 * Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern.
 */

using System;
using System.Windows.Forms;
using System.Threading;

namespace Gamadus.Designer
{
	/// <summary>
	/// Class with program entry point.
	/// </summary>
	internal sealed class Program
	{
		/// <summary>
		/// Program entry point.
		/// </summary>
		[STAThread]
		private static void Main(string[] args)
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			#if RELEASE
			Application.ThreadException += new ThreadExceptionEventHandler(new ThreadExceptionHandler().ApplicationThreadException);
			#endif
			Application.Run(new MainForm());
		}
		
	}
	

	/// <summary>
	/// Handles any thread exceptions
	/// </summary>
	public class ThreadExceptionHandler
	{
		public void ApplicationThreadException(object sender, ThreadExceptionEventArgs e)
		{
			ThreadExceptionDialog dialog = new ThreadExceptionDialog(e.Exception);
			dialog.ShowDialog();
		}
	}
}
